<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="../houtai/include/peizhi.jsp"%>
<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<link rel="shortcut icon" type="image/x-icon" href="${ctx}/images/favicon.ico" />
	<meta name="title" content="${titleVo.title}">
	<meta name="keywords" content="${titleVo.keyword}">
	<meta name="description" content="${titleVo.content}">
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<link rel="stylesheet" type="text/css" href="${ctx}/css/basepc.css">
	<link rel="stylesheet" type="text/css" href="${ctx}/css/index.css">
	<script type="text/javascript" src="${ctx}/js/jquery-1.9.1.min.js"></script>
	<script type="text/javascript" src="${ctx}/js/list.js"></script>
	<script type="text/javascript" src="${ctx}/js/pagehoutai.js"></script>
	<title></title>
<style type="text/css">
	.choice {
	    width: 1000px;
	    margin: 0 auto;
	    overflow: hidden;
	    background-color: #f0f0f0;
	}
	.tableTr{
		padding-left:50px;
	}
	#sub{
		width:140px;
		height:36px;
		line-height:18px;
		font-size:18px;
		background:url("${ctx}/images/sucai/timg.jpg") no-repeat left top;
		color:#FFF;padding-bottom:4px;
		background-size:140px 36px;
		cursor:pointer;
	}
</style>
</head>
<body>
	<div class="home-top" style="_height:10rem;min-height:10rem;background-image: none;height: 0px;">
		<jsp:include page="/WEB-INF/views/qiantai/include/head.jsp" />
			<div class="choice">
				<table style="vertical-align:middle;" border="1">
					<tr height="70rem">
						<td>标题中关键词搜索：<input type="text" name='keyword' id='keyword'> <img style="cursor:pointer" onclick='toUrl()' src="${ctx}/images/front/index/search_btn1.png"/></td>
						<!-- <td>标题</td>
						<td>内容简介</td> -->
					</tr>
				</table>
			</div>
		<div class="home-ui">
		</div>
	</div>
	<div class="w1200">
		<div class="home-tap">
			<div id="title_1" style="text-align: center;"><h1>${content.title}</h1></div>
			<br>
			<hr style=" height:2px;border:none;border-top:2px dotted #185598;" />
			<br>
			<br>
			<div>${content.content}</div><!-- style="text-align: center;" -->
		</div>
	</div>
	<div class="w1200 ">
		<div class="home-hot-box">
			<div class="home-hot">
				<h4>展会留言或预定：</h4>
				<form action="${ctx}/customerMesage/insert" id='forms' method="post">
				<input type="hidden" name='contentCode' value='${content.id}'>
				${content.title}
					<table  class="w1200 ">
						<tbody>
							<tr>
								<td class='tableTr'>留言：<br/><textarea id='contents' name='contents' rows="20" cols="120"></textarea></td>
							</tr>
							<tr>
								<td class='tableTr' style='padding-left:10rem;padding-top:1rem;padding-bottom:1rem;'><input id='sub' type="button" value='提交'></td>
							</tr>
						</tbody>
					</table>
				</form>
			</div>
		</div>
	</div>
	<jsp:include page="/WEB-INF/views/qiantai/include/foot.jsp"/>
</body>
<script type="text/javascript">
	function toUrl(){
		window.location.href = "/list/type?ss=3&keyword="+$("#keyword").val();
	}
	$("#sub").click(function(){
		$.ajax({
			url:"${cxt}/qt/login/isLogin",
			type:"post",
			data:"",
			success:function(data){
				if(data.stats=='0'){
					var contents=$("#contents").val();
					if(contents==null||contents==undefined||contents==""){
						alert("留言不可为空");
						return;
					}
					$.ajax({
						url:$("#forms").attr("action"),
						type:"post",
						data:$("#forms").serialize(),
						success:function(data){
							if(data=='1'){
								alert("提交成功，稍后会有工作人员会跟您联系");
							}else if(data=='2'){
								alert("登录超时请重新登录后留言");
							}else{
								alert("留言失败，请重新操作或者联系管理员");
							}
						}
					});
				}else{
					alert("你还未登录请先登录/注册");
				}
			}
		});
	});
</script>
</html>